﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MutFormStudio.ToXaml {
	//非常感谢来自C# WinForm交流 群的 @inumaki 。需要引用PresentationFramework
	public class Studio {
		public SubStudioList Sub_studios { get; set; } = new SubStudioList();

	}
	public class SubStudio {
		public Form Form { get; set; }
		public int Height { get; set; } 
		public int Width { get; set; }
		public StringList Controls { get; set; } = new StringList();
		public int Split_distance { get; set; }
		public Orientation orientation { get; set; }
		public SplitDirection Direacton { get; set; }
		public SubStudio Main_studio { get; set; }
		public SubStudio Second_studio { get; set; }
	}
	public class StringList : List<string> { }
	public class SubStudioList : List<SubStudio> { }
	public class Form {
		public int X { get; set; }
		public int Y { get; set; }
		public int Width { get; set; }
		public int Height { get; set; }
		public System.Windows.Forms.FormWindowState Window_state { get; set; }
		public Form() { }
		public Form(System.Windows.Forms.Form f) {
			X = f.Location.X;
			Y = f.Location.Y;
			Height = f.Height;
			Width = f.Width;
			Window_state = f.WindowState;
		}
		public void setToForm(System.Windows.Forms.Form f) {
			f.Location = new System.Drawing.Point(X, Y);
			f.Size = new System.Drawing.Size(Width, Height);
			f.WindowState = Window_state;
		}
	}

}
